<template>
    <div class="custom-vue-node">
      <h3>{{ data?.title || 'Default Title' }}</h3>
      <button @click="handleClick">Delete</button>
    </div>
  </template>
  
  <script setup>
  import { defineProps } from 'vue';
  
  const props = defineProps({
    data: {
      type: Object,
      default: () => ({ title: 'Default Title' })
    }
  });
  
  const handleClick = () => {
    console.log('Button clicked!', props.data);
  };
  </script>
  
  <style scoped>
  .custom-vue-node {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: inherit; /* 继承父级背景 */
    border-radius: inherit; /* 继承父级圆角 */
    box-sizing: border-box;
    padding: 8px;
  }
  
  .custom-vue-node h3 {
    color: #fff;
    margin: 0 0 8px 0;
    font-size: 14px;
    text-align: center;
  }
  
  .custom-vue-node button {
    background: #fff;
    color: #5F95FF;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
  }
  </style>